From e1f8d5a647836d639bc52f5487493a2ab238f7c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sat, 18 Feb 2017 11:12:24 +0100 Subject: [PATCH] notebook: Use gtk_widget_measure --- gtk/gtknotebook.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index db1cd67f25..b97b26d228 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -4544,10 +4544,8 @@ allocate_tab (GtkCssGadget *gadget, { if (priv->tab_pos == GTK_POS_TOP || priv->tab_pos == GTK_POS_BOTTOM) { - gtk_widget_get_preferred_width_for_height (page->tab_label, - allocation->height, - NULL, - &child_allocation.width); + gtk_widget_measure (page->tab_label, GTK_ORIENTATION_HORIZONTAL, allocation->height, + NULL, &child_allocation.width, NULL, NULL); if (child_allocation.width > allocation->width) child_allocation.width = allocation->width; else @@ -4556,10 +4554,9 @@ allocate_tab (GtkCssGadget *gadget, } else { - gtk_widget_get_preferred_height_for_width (page->tab_label, - allocation->width, - NULL, - &child_allocation.height); + gtk_widget_measure (page->tab_label, GTK_ORIENTATION_VERTICAL, allocation->width, + NULL, &child_allocation.height, NULL, NULL); + if (child_allocation.height > allocation->height) child_allocation.height = allocation->height; else -- 2.30.2